#include "Problem.h"
#include "Instance.h"
#include "Objective.h"
#include "Model.h"

Problem::Problem() {
	inst = NULL;
	objective = NULL;
}

Problem::~Problem() {
	if (inst != NULL)
		delete inst;

	if (objective != NULL)
		delete objective;
}

double Problem::evaluate( Solution *sol ) throw (NotReady) {
	if (objective == NULL) throw NotReady("Problem");

	return objective->evaluate(sol);
}